<!Doctype html>
<!--
/*
 * hb-autologin - Login to University College of Borås pages automatically
 * Version: 0.1.1
 * Author: David Laurell <david.laurell@gmail.com>
 * License: GPLv3
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */
-->
<html>
<head>
	<title>Options for hb-autologin</title>
	<meta charset="utf8" />
<style>
body {
	background: #123;
	margin: 0;
	font-family: sans-serif;
}
.box {
	background: #fff;
	border: 5px solid #345;
	padding: 1em;
	margin: 1em auto;
	width: 300px;
}
h1 {
	font-size: 3em;
	font-weight: normal;
	color: #fff;
	text-align: center;
}
label {
	font-size: 1.1em;
	font-weight: normal;
}

input {
	padding: 0.5em;
	font-size: 1.2em;
	margin: .5em;
}

</style>
<script src="etc.js"></script>
<script>
document.onsubmit = function(e) {
	var username = document.getElementById("username").value;
	var password = document.getElementById("password").value;
	saveLogin(username,password);
	alert("Login saved!");

	e.preventDefault();
};
</script>
</head>

<body>

<h1>Options</h1>

<div class="box">
	<p>Please input your University College of Borås login so that this extension can login on HB-related sites automatically.</p>
	<form>
	<div style="text-align: center">
		<label for="username">Username</label>
		<input type="text" id="username" />
		<label for="password">Password</label>
		<input type="password" id="password" />

		<input type="submit" value="Save password" />
	</div>
	</form>
</div>
<script>
	var login = getLogin();
	document.getElementById("username").value = login.username;
</script>

</body>
</html>
